package com.magist.core.entity;

import org.apache.commons.lang3.builder.ToStringBuilder;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;

/**
 * 实体类的基类，定义共用属性。
 */
public abstract class Entity implements java.io.Serializable {

	private static final long serialVersionUID = -7247064809474212484L;
	// 数据标识
	@Id
	private String id;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
}
